package com.njtoyo.taxi.admin.mapper.master.mapper;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.njtoyo.taxi.admin.library.Const;
import com.njtoyo.taxi.admin.mapper.master.entity.SimpleCallRideOrder;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.njtoyo.taxi.admin.mapper.master.enums.SimpleCallRideCategory;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 一键叫车行程订单表 Mapper 接口
 * </p>
 *
 * @author Dell
 * @since 2021-11-01
 */
@Repository
@DS(Const.PRIMARY_DS)
public interface SimpleCallRideOrderMapper extends BaseMapper<SimpleCallRideOrder> {
    BigDecimal computeDriverBalance(Long driverId);

    List<Map<String, Object>> selectByHour(@Param("categorys") List<SimpleCallRideCategory> categorys, @Param("startDate") Date todayStart, @Param("endDate") Date todayEnd, @Param("cantonId") Integer cantonId);

    List<Map<String, Object>> selectFinishByDay(@Param("categorys") List<SimpleCallRideCategory> categorys, @Param("startDate") Date todayStart, @Param("endDate") Date todayEnd, @Param("cantonId") Integer cantonId);
}
